import * as Types from '../action-types';

let initState={
    userInfo:{},
    err:''
}

export default function (state=initState,action){
    switch(action.type){
        case Types.SET_ERROR:
            return {...state,err:action.error}
        case Types.SET_USER_INFO:
            return {...state,userInfo:action.userInfo,err:''}
        default:
          return state
    }
    
}